<div>
	<form action="/edit/codebook/?cid={{ codebook.id }}" method="POST" enctype="multipart/form-data" onsubmit='$(this).find(".status").removeClass("hidden");return true;'>
		<div class='formfieldcontainer'>
			<label class="fieldlabel" style="width:140px;">Codebook Name :</label>
			<input type='text' name='name' required="required" value='{{ codebook.name }}' />
		</div>
	
		<div class='formfieldcontainer'>
			<label class="fieldlabel" style="width:140px;">Upload Codebook XML :</label>
			<input type="file" name="codebookfile" id="NewCorpus" />
		</div>
		
		<div class='formfieldcontainer'>
			<label class='fieldlabel' style="width:140px;">Privacy Settings : </label>
                        <input type="radio" name="permission" value="0" {% if codebook.shared_object.sharing_permission == 0 %}checked{% endif %}>Private
                        <input type="radio" name="permission" value="1" {% if codebook.shared_object.sharing_permission == 1 %}checked{% endif %}>Read to all
                        <input type="radio" name="permission" value="2" {% if codebook.shared_object.sharing_permission == 2 %}checked{% endif %}>Open Source
		</div>

		<div class='formfieldcontainer'>
			<input type="submit" value="Edit" class="button-base button-blue button-small" style="margin-left:50px;" />
		</div>
		<div class="hidden status highlight ui-state-highlight" style='margin-top:5px;'>
                        Uploading... Do not close the window in the middle of the uploading
                </div>
	</form>
</div>
